#pragma once

#include "targetver.h"

#define WIN32_LEAN_AND_MEAN             // Exclude rarely-used stuff from Windows headers
// Windows Header Files:
#include <windows.h>

// C RunTime Header Files
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>

#include <atlstr.h>
#include <atlwin.h>
#include <atltypes.h>
#include <atlcoll.h>
#include <shellapi.h>

#include <wtl/atlapp.h>
#include <wtl/atlctrls.h>


#include <InitGuid.h>
#include <vds.h>
#include <winioctl.h>

inline HRESULT GetLastHr()
{
	return HRESULT_FROM_WIN32( ::GetLastError() );
}

CStringW ErrorMessageW( HRESULT hr );

#define CHECK( hr, msg, ... )         { HRESULT __hr = ( hr ); if( FAILED( __hr ) ) { AtlTrace( msg, __VA_ARGS__ ); return __hr; } }
#define CHECK0( hr ) CHECK( hr, "" );

typedef unsigned __int64 QWORD;